package com.pretty.test.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.pretty.test.controller.system.webinfo.vo.WebInfoVO;
import com.pretty.test.entity.PetsWebInfo;
import com.pretty.test.mapper.PetsWebInfoMapper;
import com.pretty.test.service.IPetsWebInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * 本站信息服务实现类
 * @author dujianyu
 * @since 2021-03-31
 */
@Service
public class PetsWebInfoServiceImpl extends ServiceImpl<PetsWebInfoMapper, PetsWebInfo> implements IPetsWebInfoService {

    @Override
    public WebInfoVO latestInfo() {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("id_deleted",0);
        return baseMapper.latestInfo();
    }

    @Override
    public Boolean submit(PetsWebInfo petsWebInfo) {
        return baseMapper.updateById(petsWebInfo) == 1;
    }
}
